SOHtoNl, SOHtoNs, SONtoHl, SONtoHs


C Specification

#include <dolphin/socket.h>

u32 SOHtoNl ( u32 hostlong );
u16 SOHtoNs ( u16 hostshort );
u32 SONtoHl ( u32 netlong );
u16 SONtoHs ( u16 netshort );

Description

These functions convert 16-bit and 32-bit values between network byte order and host byte order.

Note: The network byte order and the host byte order is same in the Gekko microprocessor (big endian).

Arguments

hostlong 32 bit integer in host byte order.
hostshort 16 bit integer in host byte order.
netlong 32 bit integer in network byte order.
netshort 16 bit integer in network byte order.

Return Values

The SOHtoNl() and SOHtoNs() functions return the argument value converted from host to network byte order.

The SONtoHl() and SONtoHs() functions return the argument value converted from network to host byte order.

See Also